var teamId;
var teamName;
var tmGameId;
var backURL;
var gameScoreList={};
$(document).ready(function(){ 
	$('#header').animate({'top':'0px'},400);
	teamId = args.teamId; //取得id的值
	teamName = args.teamName;
	tmGameId = args.tmGameId;
	backURL = args.backURL;
	
	var paraData = {teamId:teamId,tmGameId:tmGameId};
	$.getJSON(path+"/soccer/teamGameAction!selectGameScore.action",paraData, function(data){
		gameScoreList = data.gameScoreList;
	  	var gameScoreHtml=[];
	  	$.each(gameScoreList,function(index,obj){
	  		var indexNo = index+1;
	  		gameScoreHtml.push("<tr>");
	  		gameScoreHtml.push("<td nowrap='nowrap' style='color:yellow'>"+indexNo+"</td>");
	  		gameScoreHtml.push("<td nowrap='nowrap' style='color:yellow'>"+obj.playUserNo+"</td>");
	  		gameScoreHtml.push("<td nowrap='nowrap' style='color:yellow'>"+obj.playUserName+"</td>");
	  		gameScoreHtml.push("<td nowrap='nowrap' style='color:yellow'>"+obj.techScore+"</td>");
	  		gameScoreHtml.push("<td nowrap='nowrap' style='color:yellow'>"+obj.arriveScore+"</td>");
	  		gameScoreHtml.push("<td nowrap='nowrap' style='color:yellow'>"+obj.totalScore+"</td>");
	  		gameScoreHtml.push("</tr>");
	  	});
	  	$("#gameScoreBody0").html(gameScoreHtml.join(""));  
	  	$("#gameScoreBody1").html(gameScoreHtml.join(""));  
	});
	
//	$("#submitBtn").click(function(){
////		var techForm = $("#techForm");
////		techForm.submit();
//		
//		var jsonStr = JSON.stringify(gameTechList);
//		$.post(path+"/soccer/teamGameAction!gameTechSubmit.action",{teamId:teamId,tmGameId:tmGameId,jsonStr:jsonStr}, function(data){
//			strMessage = data.strMessage;
//			$('#strMessage').text(strMessage);
//		},'json');
//	});
});
function goBack(){
	window.location.href=path+backURL+"?teamId="+teamId+"&teamName="+teamName;
}
